﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Chinaer.Models;
namespace ChinaerServices
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“UserService”。
    public class UserService : IUserService
    {

        public List<Chinaer.Models.UsersModel> GetAllUsers()
        {
            List<UsersModel> UserList = new List<UsersModel>();
            for (int i = 0; i <= 10; i++)
            {
                UsersModel userModel = new UsersModel() { PU_OID = i, PU_Name = "chinaer" + i.ToString(), PU_Password = "password" + i.ToString() };
                UserList.Add(userModel);
            }
            return UserList;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public bool CheckIsUserExists(string userName)
        {
            return true;
        }

        public bool CheckUserAndPassword(string userName, string password)
        {
            return true;
        }
    }
}
